package core.util;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

public abstract class Converter {
	private static XStream xstream = new XStream(new DomDriver());

	public static XStream getXStream() {
		return xstream;
	}

	public static String objectToXML(Object obj) {
		return getXStream().toXML(obj);
	}

	public static Object XMLToObject(String xml) {
		return getXStream().fromXML(xml);
	}
}
